const Ue = (e, t) => {
  var f, a;
  if (!Array.isArray(e) || !Array.isArray(t) || e.length !== t.length)
    return !1;
  const r = /* @__PURE__ */ new Map();
  e.forEach((g) => {
    var y;
    r.set(g, ((y = r.get(g)) != null ? y : 0) + 1);
  });
  for (const g of t)
    if (!r.has(g) || (r.set(g, ((f = r.get(g)) != null ? f : 0) - 1), ((a = r.get(g)) != null ? a : 0) < 0))
      return !1;
  return !0;
}, qe = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  __proto__: null,
  equal: Ue
}, Symbol.toStringTag, { value: "Module" }));
var fe = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}, k = { exports: {} };
(function(e, t) {
  (function() {
    var r;
    function f(D) {
      var A, F, p = "", w = -1, E;
      if (D && D.length)
        for (E = D.length; (w += 1) < E; )
          A = D.charCodeAt(w), F = w + 1 < E ? D.charCodeAt(w + 1) : 0, 55296 <= A && A <= 56319 && 56320 <= F && F <= 57343 && (A = 65536 + ((A & 1023) << 10) + (F & 1023), w += 1), A <= 127 ? p += String.fromCharCode(A) : A <= 2047 ? p += String.fromCharCode(
            192 | A >>> 6 & 31,
            128 | A & 63
          ) : A <= 65535 ? p += String.fromCharCode(
            224 | A >>> 12 & 15,
            128 | A >>> 6 & 63,
            128 | A & 63
          ) : A <= 2097151 && (p += String.fromCharCode(
            240 | A >>> 18 & 7,
            128 | A >>> 12 & 63,
            128 | A >>> 6 & 63,
            128 | A & 63
          ));
      return p;
    }
    function a(D) {
      var A, F, p, w, E, _ = [], l;
      if (A = F = p = w = E = 0, D && D.length)
        for (l = D.length, D += ""; A < l; )
          p = D.charCodeAt(A), F += 1, p < 128 ? (_[F] = String.fromCharCode(p), A += 1) : p > 191 && p < 224 ? (w = D.charCodeAt(A + 1), _[F] = String.fromCharCode((p & 31) << 6 | w & 63), A += 2) : (w = D.charCodeAt(A + 1), E = D.charCodeAt(A + 2), _[F] = String.fromCharCode((p & 15) << 12 | (w & 63) << 6 | E & 63), A += 3);
      return _.join("");
    }
    function g(D, A) {
      var F = (D & 65535) + (A & 65535), p = (D >> 16) + (A >> 16) + (F >> 16);
      return p << 16 | F & 65535;
    }
    function y(D, A) {
      return D << A | D >>> 32 - A;
    }
    function O(D, A) {
      for (var F = A ? "0123456789ABCDEF" : "0123456789abcdef", p = "", w, E = 0, _ = D.length; E < _; E += 1)
        w = D.charCodeAt(E), p += F.charAt(w >>> 4 & 15) + F.charAt(w & 15);
      return p;
    }
    function P(D) {
      var A, F = D.length * 32, p = "";
      for (A = 0; A < F; A += 8)
        p += String.fromCharCode(D[A >> 5] >>> 24 - A % 32 & 255);
      return p;
    }
    function q(D) {
      var A, F = D.length * 32, p = "";
      for (A = 0; A < F; A += 8)
        p += String.fromCharCode(D[A >> 5] >>> A % 32 & 255);
      return p;
    }
    function G(D) {
      var A, F = D.length * 8, p = Array(D.length >> 2), w = p.length;
      for (A = 0; A < w; A += 1)
        p[A] = 0;
      for (A = 0; A < F; A += 8)
        p[A >> 5] |= (D.charCodeAt(A / 8) & 255) << A % 32;
      return p;
    }
    function M(D) {
      var A, F = D.length * 8, p = Array(D.length >> 2), w = p.length;
      for (A = 0; A < w; A += 1)
        p[A] = 0;
      for (A = 0; A < F; A += 8)
        p[A >> 5] |= (D.charCodeAt(A / 8) & 255) << 24 - A % 32;
      return p;
    }
    function T(D, A) {
      var F = A.length, p = Array(), w, E, _, l, S, B, x, v;
      for (B = Array(Math.ceil(D.length / 2)), l = B.length, w = 0; w < l; w += 1)
        B[w] = D.charCodeAt(w * 2) << 8 | D.charCodeAt(w * 2 + 1);
      for (; B.length > 0; ) {
        for (S = Array(), _ = 0, w = 0; w < B.length; w += 1)
          _ = (_ << 16) + B[w], E = Math.floor(_ / F), _ -= E * F, (S.length > 0 || E > 0) && (S[S.length] = E);
        p[p.length] = _, B = S;
      }
      for (x = "", w = p.length - 1; w >= 0; w--)
        x += A.charAt(p[w]);
      for (v = Math.ceil(D.length * 8 / (Math.log(A.length) / Math.log(2))), w = x.length; w < v; w += 1)
        x = A[0] + x;
      return x;
    }
    function N(D, A) {
      var F = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", p = "", w = D.length, E, _, l;
      for (A = A || "=", E = 0; E < w; E += 3)
        for (l = D.charCodeAt(E) << 16 | (E + 1 < w ? D.charCodeAt(E + 1) << 8 : 0) | (E + 2 < w ? D.charCodeAt(E + 2) : 0), _ = 0; _ < 4; _ += 1)
          E * 8 + _ * 6 > D.length * 8 ? p += A : p += F.charAt(l >>> 6 * (3 - _) & 63);
      return p;
    }
    r = {
      VERSION: "1.0.6",
      Base64: function() {
        var D = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", A = "=", F = !0;
        this.encode = function(p) {
          var w, E, _, l = "", S = p.length;
          for (A = A || "=", p = F ? f(p) : p, w = 0; w < S; w += 3)
            for (_ = p.charCodeAt(w) << 16 | (w + 1 < S ? p.charCodeAt(w + 1) << 8 : 0) | (w + 2 < S ? p.charCodeAt(w + 2) : 0), E = 0; E < 4; E += 1)
              w * 8 + E * 6 > S * 8 ? l += A : l += D.charAt(_ >>> 6 * (3 - E) & 63);
          return l;
        }, this.decode = function(p) {
          var w, E, _, l, S, B, x, v, s, m, n = "", o = [];
          if (!p)
            return p;
          w = m = 0, p = p.replace(new RegExp("\\" + A, "gi"), "");
          do
            S = D.indexOf(p.charAt(w += 1)), B = D.indexOf(p.charAt(w += 1)), x = D.indexOf(p.charAt(w += 1)), v = D.indexOf(p.charAt(w += 1)), s = S << 18 | B << 12 | x << 6 | v, E = s >> 16 & 255, _ = s >> 8 & 255, l = s & 255, m += 1, x === 64 ? o[m] = String.fromCharCode(E) : v === 64 ? o[m] = String.fromCharCode(E, _) : o[m] = String.fromCharCode(E, _, l);
          while (w < p.length);
          return n = o.join(""), n = F ? a(n) : n, n;
        }, this.setPad = function(p) {
          return A = p || A, this;
        }, this.setTab = function(p) {
          return D = p || D, this;
        }, this.setUTF8 = function(p) {
          return typeof p == "boolean" && (F = p), this;
        };
      },
      CRC32: function(D) {
        var A = 0, F = 0, p = 0, w, E, _;
        for (D = f(D), w = [
          "00000000 77073096 EE0E612C 990951BA 076DC419 706AF48F E963A535 9E6495A3 0EDB8832 ",
          "79DCB8A4 E0D5E91E 97D2D988 09B64C2B 7EB17CBD E7B82D07 90BF1D91 1DB71064 6AB020F2 F3B97148 ",
          "84BE41DE 1ADAD47D 6DDDE4EB F4D4B551 83D385C7 136C9856 646BA8C0 FD62F97A 8A65C9EC 14015C4F ",
          "63066CD9 FA0F3D63 8D080DF5 3B6E20C8 4C69105E D56041E4 A2677172 3C03E4D1 4B04D447 D20D85FD ",
          "A50AB56B 35B5A8FA 42B2986C DBBBC9D6 ACBCF940 32D86CE3 45DF5C75 DCD60DCF ABD13D59 26D930AC ",
          "51DE003A C8D75180 BFD06116 21B4F4B5 56B3C423 CFBA9599 B8BDA50F 2802B89E 5F058808 C60CD9B2 ",
          "B10BE924 2F6F7C87 58684C11 C1611DAB B6662D3D 76DC4190 01DB7106 98D220BC EFD5102A 71B18589 ",
          "06B6B51F 9FBFE4A5 E8B8D433 7807C9A2 0F00F934 9609A88E E10E9818 7F6A0DBB 086D3D2D 91646C97 ",
          "E6635C01 6B6B51F4 1C6C6162 856530D8 F262004E 6C0695ED 1B01A57B 8208F4C1 F50FC457 65B0D9C6 ",
          "12B7E950 8BBEB8EA FCB9887C 62DD1DDF 15DA2D49 8CD37CF3 FBD44C65 4DB26158 3AB551CE A3BC0074 ",
          "D4BB30E2 4ADFA541 3DD895D7 A4D1C46D D3D6F4FB 4369E96A 346ED9FC AD678846 DA60B8D0 44042D73 ",
          "33031DE5 AA0A4C5F DD0D7CC9 5005713C 270241AA BE0B1010 C90C2086 5768B525 206F85B3 B966D409 ",
          "CE61E49F 5EDEF90E 29D9C998 B0D09822 C7D7A8B4 59B33D17 2EB40D81 B7BD5C3B C0BA6CAD EDB88320 ",
          "9ABFB3B6 03B6E20C 74B1D29A EAD54739 9DD277AF 04DB2615 73DC1683 E3630B12 94643B84 0D6D6A3E ",
          "7A6A5AA8 E40ECF0B 9309FF9D 0A00AE27 7D079EB1 F00F9344 8708A3D2 1E01F268 6906C2FE F762575D ",
          "806567CB 196C3671 6E6B06E7 FED41B76 89D32BE0 10DA7A5A 67DD4ACC F9B9DF6F 8EBEEFF9 17B7BE43 ",
          "60B08ED5 D6D6A3E8 A1D1937E 38D8C2C4 4FDFF252 D1BB67F1 A6BC5767 3FB506DD 48B2364B D80D2BDA ",
          "AF0A1B4C 36034AF6 41047A60 DF60EFC3 A867DF55 316E8EEF 4669BE79 CB61B38C BC66831A 256FD2A0 ",
          "5268E236 CC0C7795 BB0B4703 220216B9 5505262F C5BA3BBE B2BD0B28 2BB45A92 5CB36A04 C2D7FFA7 ",
          "B5D0CF31 2CD99E8B 5BDEAE1D 9B64C2B0 EC63F226 756AA39C 026D930A 9C0906A9 EB0E363F 72076785 ",
          "05005713 95BF4A82 E2B87A14 7BB12BAE 0CB61B38 92D28E9B E5D5BE0D 7CDCEFB7 0BDBDF21 86D3D2D4 ",
          "F1D4E242 68DDB3F8 1FDA836E 81BE16CD F6B9265B 6FB077E1 18B74777 88085AE6 FF0F6A70 66063BCA ",
          "11010B5C 8F659EFF F862AE69 616BFFD3 166CCF45 A00AE278 D70DD2EE 4E048354 3903B3C2 A7672661 ",
          "D06016F7 4969474D 3E6E77DB AED16A4A D9D65ADC 40DF0B66 37D83BF0 A9BCAE53 DEBB9EC5 47B2CF7F ",
          "30B5FFE9 BDBDF21C CABAC28A 53B39330 24B4A3A6 BAD03605 CDD70693 54DE5729 23D967BF B3667A2E ",
          "C4614AB8 5D681B02 2A6F2B94 B40BBE37 C30C8EA1 5A05DF1B 2D02EF8D"
        ].join(""), A = A ^ -1, E = 0, _ = D.length; E < _; E += 1)
          p = (A ^ D.charCodeAt(E)) & 255, F = "0x" + w.substr(p * 9, 8), A = A >>> 8 ^ F;
        return (A ^ -1) >>> 0;
      },
      MD5: function(D) {
        var A = D && typeof D.uppercase == "boolean" ? D.uppercase : !1, F = D && typeof D.pad == "string" ? D.pad : "=", p = D && typeof D.utf8 == "boolean" ? D.utf8 : !0;
        this.hex = function(s) {
          return O(w(s), A);
        }, this.b64 = function(s) {
          return N(w(s), F);
        }, this.any = function(s, m) {
          return T(w(s), m);
        }, this.raw = function(s) {
          return w(s);
        }, this.hex_hmac = function(s, m) {
          return O(E(s, m), A);
        }, this.b64_hmac = function(s, m) {
          return N(E(s, m), F);
        }, this.any_hmac = function(s, m, n) {
          return T(E(s, m), n);
        }, this.vm_test = function() {
          return hex("abc").toLowerCase() === "900150983cd24fb0d6963f7d28e17f72";
        }, this.setUpperCase = function(s) {
          return typeof s == "boolean" && (A = s), this;
        }, this.setPad = function(s) {
          return F = s || F, this;
        }, this.setUTF8 = function(s) {
          return typeof s == "boolean" && (p = s), this;
        };
        function w(s) {
          return s = p ? f(s) : s, q(_(G(s), s.length * 8));
        }
        function E(s, m) {
          var n, o, c, i, b;
          for (s = p ? f(s) : s, m = p ? f(m) : m, n = G(s), n.length > 16 && (n = _(n, s.length * 8)), o = Array(16), c = Array(16), b = 0; b < 16; b += 1)
            o[b] = n[b] ^ 909522486, c[b] = n[b] ^ 1549556828;
          return i = _(o.concat(G(m)), 512 + m.length * 8), q(_(c.concat(i), 512 + 128));
        }
        function _(s, m) {
          var n, o, c, i, b, d = 1732584193, u = -271733879, C = -1732584194, h = 271733878;
          for (s[m >> 5] |= 128 << m % 32, s[(m + 64 >>> 9 << 4) + 14] = m, n = 0; n < s.length; n += 16)
            o = d, c = u, i = C, b = h, d = S(d, u, C, h, s[n + 0], 7, -680876936), h = S(h, d, u, C, s[n + 1], 12, -389564586), C = S(C, h, d, u, s[n + 2], 17, 606105819), u = S(u, C, h, d, s[n + 3], 22, -1044525330), d = S(d, u, C, h, s[n + 4], 7, -176418897), h = S(h, d, u, C, s[n + 5], 12, 1200080426), C = S(C, h, d, u, s[n + 6], 17, -1473231341), u = S(u, C, h, d, s[n + 7], 22, -45705983), d = S(d, u, C, h, s[n + 8], 7, 1770035416), h = S(h, d, u, C, s[n + 9], 12, -1958414417), C = S(C, h, d, u, s[n + 10], 17, -42063), u = S(u, C, h, d, s[n + 11], 22, -1990404162), d = S(d, u, C, h, s[n + 12], 7, 1804603682), h = S(h, d, u, C, s[n + 13], 12, -40341101), C = S(C, h, d, u, s[n + 14], 17, -1502002290), u = S(u, C, h, d, s[n + 15], 22, 1236535329), d = B(d, u, C, h, s[n + 1], 5, -165796510), h = B(h, d, u, C, s[n + 6], 9, -1069501632), C = B(C, h, d, u, s[n + 11], 14, 643717713), u = B(u, C, h, d, s[n + 0], 20, -373897302), d = B(d, u, C, h, s[n + 5], 5, -701558691), h = B(h, d, u, C, s[n + 10], 9, 38016083), C = B(C, h, d, u, s[n + 15], 14, -660478335), u = B(u, C, h, d, s[n + 4], 20, -405537848), d = B(d, u, C, h, s[n + 9], 5, 568446438), h = B(h, d, u, C, s[n + 14], 9, -1019803690), C = B(C, h, d, u, s[n + 3], 14, -187363961), u = B(u, C, h, d, s[n + 8], 20, 1163531501), d = B(d, u, C, h, s[n + 13], 5, -1444681467), h = B(h, d, u, C, s[n + 2], 9, -51403784), C = B(C, h, d, u, s[n + 7], 14, 1735328473), u = B(u, C, h, d, s[n + 12], 20, -1926607734), d = x(d, u, C, h, s[n + 5], 4, -378558), h = x(h, d, u, C, s[n + 8], 11, -2022574463), C = x(C, h, d, u, s[n + 11], 16, 1839030562), u = x(u, C, h, d, s[n + 14], 23, -35309556), d = x(d, u, C, h, s[n + 1], 4, -1530992060), h = x(h, d, u, C, s[n + 4], 11, 1272893353), C = x(C, h, d, u, s[n + 7], 16, -155497632), u = x(u, C, h, d, s[n + 10], 23, -1094730640), d = x(d, u, C, h, s[n + 13], 4, 681279174), h = x(h, d, u, C, s[n + 0], 11, -358537222), C = x(C, h, d, u, s[n + 3], 16, -722521979), u = x(u, C, h, d, s[n + 6], 23, 76029189), d = x(d, u, C, h, s[n + 9], 4, -640364487), h = x(h, d, u, C, s[n + 12], 11, -421815835), C = x(C, h, d, u, s[n + 15], 16, 530742520), u = x(u, C, h, d, s[n + 2], 23, -995338651), d = v(d, u, C, h, s[n + 0], 6, -198630844), h = v(h, d, u, C, s[n + 7], 10, 1126891415), C = v(C, h, d, u, s[n + 14], 15, -1416354905), u = v(u, C, h, d, s[n + 5], 21, -57434055), d = v(d, u, C, h, s[n + 12], 6, 1700485571), h = v(h, d, u, C, s[n + 3], 10, -1894986606), C = v(C, h, d, u, s[n + 10], 15, -1051523), u = v(u, C, h, d, s[n + 1], 21, -2054922799), d = v(d, u, C, h, s[n + 8], 6, 1873313359), h = v(h, d, u, C, s[n + 15], 10, -30611744), C = v(C, h, d, u, s[n + 6], 15, -1560198380), u = v(u, C, h, d, s[n + 13], 21, 1309151649), d = v(d, u, C, h, s[n + 4], 6, -145523070), h = v(h, d, u, C, s[n + 11], 10, -1120210379), C = v(C, h, d, u, s[n + 2], 15, 718787259), u = v(u, C, h, d, s[n + 9], 21, -343485551), d = g(d, o), u = g(u, c), C = g(C, i), h = g(h, b);
          return Array(d, u, C, h);
        }
        function l(s, m, n, o, c, i) {
          return g(y(g(g(m, s), g(o, i)), c), n);
        }
        function S(s, m, n, o, c, i, b) {
          return l(m & n | ~m & o, s, m, c, i, b);
        }
        function B(s, m, n, o, c, i, b) {
          return l(m & o | n & ~o, s, m, c, i, b);
        }
        function x(s, m, n, o, c, i, b) {
          return l(m ^ n ^ o, s, m, c, i, b);
        }
        function v(s, m, n, o, c, i, b) {
          return l(n ^ (m | ~o), s, m, c, i, b);
        }
      },
      SHA1: function(D) {
        var A = D && typeof D.uppercase == "boolean" ? D.uppercase : !1, F = D && typeof D.pad == "string" ? D.pad : "=", p = D && typeof D.utf8 == "boolean" ? D.utf8 : !0;
        this.hex = function(B) {
          return O(w(B), A);
        }, this.b64 = function(B) {
          return N(w(B), F);
        }, this.any = function(B, x) {
          return T(w(B), x);
        }, this.raw = function(B) {
          return w(B);
        }, this.hex_hmac = function(B, x) {
          return O(E(B, x));
        }, this.b64_hmac = function(B, x) {
          return N(E(B, x), F);
        }, this.any_hmac = function(B, x, v) {
          return T(E(B, x), v);
        }, this.vm_test = function() {
          return hex("abc").toLowerCase() === "900150983cd24fb0d6963f7d28e17f72";
        }, this.setUpperCase = function(B) {
          return typeof B == "boolean" && (A = B), this;
        }, this.setPad = function(B) {
          return F = B || F, this;
        }, this.setUTF8 = function(B) {
          return typeof B == "boolean" && (p = B), this;
        };
        function w(B) {
          return B = p ? f(B) : B, P(_(M(B), B.length * 8));
        }
        function E(B, x) {
          var v, s, m, n, o;
          for (B = p ? f(B) : B, x = p ? f(x) : x, v = M(B), v.length > 16 && (v = _(v, B.length * 8)), s = Array(16), m = Array(16), n = 0; n < 16; n += 1)
            s[n] = v[n] ^ 909522486, m[n] = v[n] ^ 1549556828;
          return o = _(s.concat(M(x)), 512 + x.length * 8), P(_(m.concat(o), 512 + 160));
        }
        function _(B, x) {
          var v, s, m, n, o, c, i, b, d = Array(80), u = 1732584193, C = -271733879, h = -1732584194, R = 271733878, H = -1009589776;
          for (B[x >> 5] |= 128 << 24 - x % 32, B[(x + 64 >> 9 << 4) + 15] = x, v = 0; v < B.length; v += 16) {
            for (n = u, o = C, c = h, i = R, b = H, s = 0; s < 80; s += 1)
              s < 16 ? d[s] = B[v + s] : d[s] = y(d[s - 3] ^ d[s - 8] ^ d[s - 14] ^ d[s - 16], 1), m = g(
                g(y(u, 5), l(s, C, h, R)),
                g(g(H, d[s]), S(s))
              ), H = R, R = h, h = y(C, 30), C = u, u = m;
            u = g(u, n), C = g(C, o), h = g(h, c), R = g(R, i), H = g(H, b);
          }
          return Array(u, C, h, R, H);
        }
        function l(B, x, v, s) {
          return B < 20 ? x & v | ~x & s : B < 40 ? x ^ v ^ s : B < 60 ? x & v | x & s | v & s : x ^ v ^ s;
        }
        function S(B) {
          return B < 20 ? 1518500249 : B < 40 ? 1859775393 : B < 60 ? -1894007588 : -899497514;
        }
      },
      SHA256: function(D) {
        D && typeof D.uppercase == "boolean" && D.uppercase;
        var A = D && typeof D.pad == "string" ? D.pad : "=", F = D && typeof D.utf8 == "boolean" ? D.utf8 : !0, p;
        this.hex = function(o) {
          return O(w(o, F));
        }, this.b64 = function(o) {
          return N(w(o, F), A);
        }, this.any = function(o, c) {
          return T(w(o, F), c);
        }, this.raw = function(o) {
          return w(o, F);
        }, this.hex_hmac = function(o, c) {
          return O(E(o, c));
        }, this.b64_hmac = function(o, c) {
          return N(E(o, c), A);
        }, this.any_hmac = function(o, c, i) {
          return T(E(o, c), i);
        }, this.vm_test = function() {
          return hex("abc").toLowerCase() === "900150983cd24fb0d6963f7d28e17f72";
        }, this.setUpperCase = function(o) {
          return this;
        }, this.setPad = function(o) {
          return A = o || A, this;
        }, this.setUTF8 = function(o) {
          return typeof o == "boolean" && (F = o), this;
        };
        function w(o, c) {
          return o = c ? f(o) : o, P(n(M(o), o.length * 8));
        }
        function E(o, c) {
          o = F ? f(o) : o, c = F ? f(c) : c;
          var i, b = 0, d = M(o), u = Array(16), C = Array(16);
          for (d.length > 16 && (d = n(d, o.length * 8)); b < 16; b += 1)
            u[b] = d[b] ^ 909522486, C[b] = d[b] ^ 1549556828;
          return i = n(u.concat(M(c)), 512 + c.length * 8), P(n(C.concat(i), 512 + 256));
        }
        function _(o, c) {
          return o >>> c | o << 32 - c;
        }
        function l(o, c) {
          return o >>> c;
        }
        function S(o, c, i) {
          return o & c ^ ~o & i;
        }
        function B(o, c, i) {
          return o & c ^ o & i ^ c & i;
        }
        function x(o) {
          return _(o, 2) ^ _(o, 13) ^ _(o, 22);
        }
        function v(o) {
          return _(o, 6) ^ _(o, 11) ^ _(o, 25);
        }
        function s(o) {
          return _(o, 7) ^ _(o, 18) ^ l(o, 3);
        }
        function m(o) {
          return _(o, 17) ^ _(o, 19) ^ l(o, 10);
        }
        p = [
          1116352408,
          1899447441,
          -1245643825,
          -373957723,
          961987163,
          1508970993,
          -1841331548,
          -1424204075,
          -670586216,
          310598401,
          607225278,
          1426881987,
          1925078388,
          -2132889090,
          -1680079193,
          -1046744716,
          -459576895,
          -272742522,
          264347078,
          604807628,
          770255983,
          1249150122,
          1555081692,
          1996064986,
          -1740746414,
          -1473132947,
          -1341970488,
          -1084653625,
          -958395405,
          -710438585,
          113926993,
          338241895,
          666307205,
          773529912,
          1294757372,
          1396182291,
          1695183700,
          1986661051,
          -2117940946,
          -1838011259,
          -1564481375,
          -1474664885,
          -1035236496,
          -949202525,
          -778901479,
          -694614492,
          -200395387,
          275423344,
          430227734,
          506948616,
          659060556,
          883997877,
          958139571,
          1322822218,
          1537002063,
          1747873779,
          1955562222,
          2024104815,
          -2067236844,
          -1933114872,
          -1866530822,
          -1538233109,
          -1090935817,
          -965641998
        ];
        function n(o, c) {
          var i = [
            1779033703,
            -1150833019,
            1013904242,
            -1521486534,
            1359893119,
            -1694144372,
            528734635,
            1541459225
          ], b = new Array(64), d, u, C, h, R, H, L, I, K, $, U, z;
          for (o[c >> 5] |= 128 << 24 - c % 32, o[(c + 64 >> 9 << 4) + 15] = c, K = 0; K < o.length; K += 16) {
            for (d = i[0], u = i[1], C = i[2], h = i[3], R = i[4], H = i[5], L = i[6], I = i[7], $ = 0; $ < 64; $ += 1)
              $ < 16 ? b[$] = o[$ + K] : b[$] = g(g(
                g(m(b[$ - 2]), b[$ - 7]),
                s(b[$ - 15])
              ), b[$ - 16]), U = g(g(
                g(g(I, v(R)), S(R, H, L)),
                p[$]
              ), b[$]), z = g(x(d), B(d, u, C)), I = L, L = H, H = R, R = g(h, U), h = C, C = u, u = d, d = g(U, z);
            i[0] = g(d, i[0]), i[1] = g(u, i[1]), i[2] = g(C, i[2]), i[3] = g(h, i[3]), i[4] = g(R, i[4]), i[5] = g(H, i[5]), i[6] = g(L, i[6]), i[7] = g(I, i[7]);
          }
          return i;
        }
      },
      SHA512: function(D) {
        D && typeof D.uppercase == "boolean" && D.uppercase;
        var A = D && typeof D.pad == "string" ? D.pad : "=", F = D && typeof D.utf8 == "boolean" ? D.utf8 : !0, p;
        this.hex = function(o) {
          return O(w(o));
        }, this.b64 = function(o) {
          return N(w(o), A);
        }, this.any = function(o, c) {
          return T(w(o), c);
        }, this.raw = function(o) {
          return w(o);
        }, this.hex_hmac = function(o, c) {
          return O(E(o, c));
        }, this.b64_hmac = function(o, c) {
          return N(E(o, c), A);
        }, this.any_hmac = function(o, c, i) {
          return T(E(o, c), i);
        }, this.vm_test = function() {
          return hex("abc").toLowerCase() === "900150983cd24fb0d6963f7d28e17f72";
        }, this.setUpperCase = function(o) {
          return this;
        }, this.setPad = function(o) {
          return A = o || A, this;
        }, this.setUTF8 = function(o) {
          return typeof o == "boolean" && (F = o), this;
        };
        function w(o) {
          return o = F ? f(o) : o, P(_(M(o), o.length * 8));
        }
        function E(o, c) {
          o = F ? f(o) : o, c = F ? f(c) : c;
          var i, b = 0, d = M(o), u = Array(32), C = Array(32);
          for (d.length > 32 && (d = _(d, o.length * 8)); b < 32; b += 1)
            u[b] = d[b] ^ 909522486, C[b] = d[b] ^ 1549556828;
          return i = _(u.concat(M(c)), 1024 + c.length * 8), P(_(C.concat(i), 1024 + 512));
        }
        function _(o, c) {
          var i, b, d, u = new Array(80), C = new Array(16), h = [
            new l(1779033703, -205731576),
            new l(-1150833019, -2067093701),
            new l(1013904242, -23791573),
            new l(-1521486534, 1595750129),
            new l(1359893119, -1377402159),
            new l(-1694144372, 725511199),
            new l(528734635, -79577749),
            new l(1541459225, 327033209)
          ], R = new l(0, 0), H = new l(0, 0), L = new l(0, 0), I = new l(0, 0), K = new l(0, 0), $ = new l(0, 0), U = new l(0, 0), z = new l(0, 0), X = new l(0, 0), Q = new l(0, 0), V = new l(0, 0), W = new l(0, 0), ue = new l(0, 0), he = new l(0, 0), Y = new l(0, 0), J = new l(0, 0), Z = new l(0, 0);
          for (p === void 0 && (p = [
            new l(1116352408, -685199838),
            new l(1899447441, 602891725),
            new l(-1245643825, -330482897),
            new l(-373957723, -2121671748),
            new l(961987163, -213338824),
            new l(1508970993, -1241133031),
            new l(-1841331548, -1357295717),
            new l(-1424204075, -630357736),
            new l(-670586216, -1560083902),
            new l(310598401, 1164996542),
            new l(607225278, 1323610764),
            new l(1426881987, -704662302),
            new l(1925078388, -226784913),
            new l(-2132889090, 991336113),
            new l(-1680079193, 633803317),
            new l(-1046744716, -815192428),
            new l(-459576895, -1628353838),
            new l(-272742522, 944711139),
            new l(264347078, -1953704523),
            new l(604807628, 2007800933),
            new l(770255983, 1495990901),
            new l(1249150122, 1856431235),
            new l(1555081692, -1119749164),
            new l(1996064986, -2096016459),
            new l(-1740746414, -295247957),
            new l(-1473132947, 766784016),
            new l(-1341970488, -1728372417),
            new l(-1084653625, -1091629340),
            new l(-958395405, 1034457026),
            new l(-710438585, -1828018395),
            new l(113926993, -536640913),
            new l(338241895, 168717936),
            new l(666307205, 1188179964),
            new l(773529912, 1546045734),
            new l(1294757372, 1522805485),
            new l(1396182291, -1651133473),
            new l(1695183700, -1951439906),
            new l(1986661051, 1014477480),
            new l(-2117940946, 1206759142),
            new l(-1838011259, 344077627),
            new l(-1564481375, 1290863460),
            new l(-1474664885, -1136513023),
            new l(-1035236496, -789014639),
            new l(-949202525, 106217008),
            new l(-778901479, -688958952),
            new l(-694614492, 1432725776),
            new l(-200395387, 1467031594),
            new l(275423344, 851169720),
            new l(430227734, -1194143544),
            new l(506948616, 1363258195),
            new l(659060556, -544281703),
            new l(883997877, -509917016),
            new l(958139571, -976659869),
            new l(1322822218, -482243893),
            new l(1537002063, 2003034995),
            new l(1747873779, -692930397),
            new l(1955562222, 1575990012),
            new l(2024104815, 1125592928),
            new l(-2067236844, -1578062990),
            new l(-1933114872, 442776044),
            new l(-1866530822, 593698344),
            new l(-1538233109, -561857047),
            new l(-1090935817, -1295615723),
            new l(-965641998, -479046869),
            new l(-903397682, -366583396),
            new l(-779700025, 566280711),
            new l(-354779690, -840897762),
            new l(-176337025, -294727304),
            new l(116418474, 1914138554),
            new l(174292421, -1563912026),
            new l(289380356, -1090974290),
            new l(460393269, 320620315),
            new l(685471733, 587496836),
            new l(852142971, 1086792851),
            new l(1017036298, 365543100),
            new l(1126000580, -1676669620),
            new l(1288033470, -885112138),
            new l(1501505948, -60457430),
            new l(1607167915, 987167468),
            new l(1816402316, 1246189591)
          ]), b = 0; b < 80; b += 1)
            u[b] = new l(0, 0);
          for (o[c >> 5] |= 128 << 24 - (c & 31), o[(c + 128 >> 10 << 5) + 31] = c, d = o.length, b = 0; b < d; b += 32) {
            for (S(L, h[0]), S(I, h[1]), S(K, h[2]), S($, h[3]), S(U, h[4]), S(z, h[5]), S(X, h[6]), S(Q, h[7]), i = 0; i < 16; i += 1)
              u[i].h = o[b + 2 * i], u[i].l = o[b + 2 * i + 1];
            for (i = 16; i < 80; i += 1)
              B(Y, u[i - 2], 19), x(J, u[i - 2], 29), v(Z, u[i - 2], 6), W.l = Y.l ^ J.l ^ Z.l, W.h = Y.h ^ J.h ^ Z.h, B(Y, u[i - 15], 1), B(J, u[i - 15], 8), v(Z, u[i - 15], 7), V.l = Y.l ^ J.l ^ Z.l, V.h = Y.h ^ J.h ^ Z.h, m(u[i], W, u[i - 7], V, u[i - 16]);
            for (i = 0; i < 80; i += 1)
              ue.l = U.l & z.l ^ ~U.l & X.l, ue.h = U.h & z.h ^ ~U.h & X.h, B(Y, U, 14), B(J, U, 18), x(Z, U, 9), W.l = Y.l ^ J.l ^ Z.l, W.h = Y.h ^ J.h ^ Z.h, B(Y, L, 28), x(J, L, 2), x(Z, L, 7), V.l = Y.l ^ J.l ^ Z.l, V.h = Y.h ^ J.h ^ Z.h, he.l = L.l & I.l ^ L.l & K.l ^ I.l & K.l, he.h = L.h & I.h ^ L.h & K.h ^ I.h & K.h, n(R, Q, W, ue, p[i], u[i]), s(H, V, he), S(Q, X), S(X, z), S(z, U), s(U, $, R), S($, K), S(K, I), S(I, L), s(L, R, H);
            s(h[0], h[0], L), s(h[1], h[1], I), s(h[2], h[2], K), s(h[3], h[3], $), s(h[4], h[4], U), s(h[5], h[5], z), s(h[6], h[6], X), s(h[7], h[7], Q);
          }
          for (b = 0; b < 8; b += 1)
            C[2 * b] = h[b].h, C[2 * b + 1] = h[b].l;
          return C;
        }
        function l(o, c) {
          this.h = o, this.l = c;
        }
        function S(o, c) {
          o.h = c.h, o.l = c.l;
        }
        function B(o, c, i) {
          o.l = c.l >>> i | c.h << 32 - i, o.h = c.h >>> i | c.l << 32 - i;
        }
        function x(o, c, i) {
          o.l = c.h >>> i | c.l << 32 - i, o.h = c.l >>> i | c.h << 32 - i;
        }
        function v(o, c, i) {
          o.l = c.l >>> i | c.h << 32 - i, o.h = c.h >>> i;
        }
        function s(o, c, i) {
          var b = (c.l & 65535) + (i.l & 65535), d = (c.l >>> 16) + (i.l >>> 16) + (b >>> 16), u = (c.h & 65535) + (i.h & 65535) + (d >>> 16), C = (c.h >>> 16) + (i.h >>> 16) + (u >>> 16);
          o.l = b & 65535 | d << 16, o.h = u & 65535 | C << 16;
        }
        function m(o, c, i, b, d) {
          var u = (c.l & 65535) + (i.l & 65535) + (b.l & 65535) + (d.l & 65535), C = (c.l >>> 16) + (i.l >>> 16) + (b.l >>> 16) + (d.l >>> 16) + (u >>> 16), h = (c.h & 65535) + (i.h & 65535) + (b.h & 65535) + (d.h & 65535) + (C >>> 16), R = (c.h >>> 16) + (i.h >>> 16) + (b.h >>> 16) + (d.h >>> 16) + (h >>> 16);
          o.l = u & 65535 | C << 16, o.h = h & 65535 | R << 16;
        }
        function n(o, c, i, b, d, u) {
          var C = (c.l & 65535) + (i.l & 65535) + (b.l & 65535) + (d.l & 65535) + (u.l & 65535), h = (c.l >>> 16) + (i.l >>> 16) + (b.l >>> 16) + (d.l >>> 16) + (u.l >>> 16) + (C >>> 16), R = (c.h & 65535) + (i.h & 65535) + (b.h & 65535) + (d.h & 65535) + (u.h & 65535) + (h >>> 16), H = (c.h >>> 16) + (i.h >>> 16) + (b.h >>> 16) + (d.h >>> 16) + (u.h >>> 16) + (R >>> 16);
          o.l = C & 65535 | h << 16, o.h = R & 65535 | H << 16;
        }
      },
      RMD160: function(D) {
        D && typeof D.uppercase == "boolean" && D.uppercase;
        var A = D && typeof D.pad == "string" ? D.pa : "=", F = D && typeof D.utf8 == "boolean" ? D.utf8 : !0, p = [
          0,
          1,
          2,
          3,
          4,
          5,
          6,
          7,
          8,
          9,
          10,
          11,
          12,
          13,
          14,
          15,
          7,
          4,
          13,
          1,
          10,
          6,
          15,
          3,
          12,
          0,
          9,
          5,
          2,
          14,
          11,
          8,
          3,
          10,
          14,
          4,
          9,
          15,
          8,
          1,
          2,
          7,
          0,
          6,
          13,
          11,
          5,
          12,
          1,
          9,
          11,
          10,
          0,
          8,
          12,
          4,
          13,
          3,
          7,
          15,
          14,
          5,
          6,
          2,
          4,
          0,
          5,
          9,
          7,
          12,
          2,
          10,
          14,
          1,
          3,
          8,
          11,
          6,
          15,
          13
        ], w = [
          5,
          14,
          7,
          0,
          9,
          2,
          11,
          4,
          13,
          6,
          15,
          8,
          1,
          10,
          3,
          12,
          6,
          11,
          3,
          7,
          0,
          13,
          5,
          10,
          14,
          15,
          8,
          12,
          4,
          9,
          1,
          2,
          15,
          5,
          1,
          3,
          7,
          14,
          6,
          9,
          11,
          8,
          12,
          2,
          10,
          0,
          4,
          13,
          8,
          6,
          4,
          1,
          3,
          11,
          15,
          0,
          5,
          12,
          2,
          13,
          9,
          7,
          10,
          14,
          12,
          15,
          10,
          4,
          1,
          5,
          8,
          7,
          6,
          2,
          13,
          14,
          0,
          3,
          9,
          11
        ], E = [
          11,
          14,
          15,
          12,
          5,
          8,
          7,
          9,
          11,
          13,
          14,
          15,
          6,
          7,
          9,
          8,
          7,
          6,
          8,
          13,
          11,
          9,
          7,
          15,
          7,
          12,
          15,
          9,
          11,
          7,
          13,
          12,
          11,
          13,
          6,
          7,
          14,
          9,
          13,
          15,
          14,
          8,
          13,
          6,
          5,
          12,
          7,
          5,
          11,
          12,
          14,
          15,
          14,
          15,
          9,
          8,
          9,
          14,
          5,
          6,
          8,
          6,
          5,
          12,
          9,
          15,
          5,
          11,
          6,
          8,
          13,
          12,
          5,
          12,
          13,
          14,
          11,
          8,
          5,
          6
        ], _ = [
          8,
          9,
          9,
          11,
          13,
          15,
          15,
          5,
          7,
          7,
          8,
          11,
          14,
          14,
          12,
          6,
          9,
          13,
          15,
          7,
          12,
          8,
          9,
          11,
          7,
          7,
          12,
          7,
          6,
          15,
          13,
          11,
          9,
          7,
          15,
          11,
          8,
          6,
          6,
          14,
          12,
          13,
          5,
          14,
          13,
          13,
          7,
          5,
          15,
          5,
          8,
          11,
          14,
          14,
          6,
          14,
          6,
          9,
          12,
          9,
          12,
          5,
          15,
          8,
          8,
          5,
          12,
          9,
          12,
          5,
          14,
          6,
          8,
          13,
          6,
          5,
          15,
          13,
          11,
          11
        ];
        this.hex = function(n) {
          return O(l(n));
        }, this.b64 = function(n) {
          return N(l(n), A);
        }, this.any = function(n, o) {
          return T(l(n), o);
        }, this.raw = function(n) {
          return l(n);
        }, this.hex_hmac = function(n, o) {
          return O(S(n, o));
        }, this.b64_hmac = function(n, o) {
          return N(S(n, o), A);
        }, this.any_hmac = function(n, o, c) {
          return T(S(n, o), c);
        }, this.vm_test = function() {
          return hex("abc").toLowerCase() === "900150983cd24fb0d6963f7d28e17f72";
        }, this.setUpperCase = function(n) {
          return this;
        }, this.setPad = function(n) {
          return typeof n < "u" && (A = n), this;
        }, this.setUTF8 = function(n) {
          return typeof n == "boolean" && (F = n), this;
        };
        function l(n) {
          return n = F ? f(n) : n, B(x(G(n), n.length * 8));
        }
        function S(n, o) {
          n = F ? f(n) : n, o = F ? f(o) : o;
          var c, i, b = G(n), d = Array(16), u = Array(16);
          for (b.length > 16 && (b = x(b, n.length * 8)), c = 0; c < 16; c += 1)
            d[c] = b[c] ^ 909522486, u[c] = b[c] ^ 1549556828;
          return i = x(d.concat(G(o)), 512 + o.length * 8), B(x(u.concat(i), 512 + 160));
        }
        function B(n) {
          var o, c = "", i = n.length * 32;
          for (o = 0; o < i; o += 8)
            c += String.fromCharCode(n[o >> 5] >>> o % 32 & 255);
          return c;
        }
        function x(n, o) {
          var c, i, b, d, u = 1732584193, C = 4023233417, h = 2562383102, R = 271733878, H = 3285377520, L, I, K, $, U, z, X, Q, V, W;
          for (n[o >> 5] |= 128 << o % 32, n[(o + 64 >>> 9 << 4) + 14] = o, d = n.length, b = 0; b < d; b += 16) {
            for (L = z = u, I = X = C, K = Q = h, $ = V = R, U = W = H, i = 0; i <= 79; i += 1)
              c = g(L, v(i, I, K, $)), c = g(c, n[b + p[i]]), c = g(c, s(i)), c = g(y(c, E[i]), U), L = U, U = $, $ = y(K, 10), K = I, I = c, c = g(z, v(79 - i, X, Q, V)), c = g(c, n[b + w[i]]), c = g(c, m(i)), c = g(y(c, _[i]), W), z = W, W = V, V = y(Q, 10), Q = X, X = c;
            c = g(C, g(K, V)), C = g(h, g($, W)), h = g(R, g(U, z)), R = g(H, g(L, X)), H = g(u, g(I, Q)), u = c;
          }
          return [u, C, h, R, H];
        }
        function v(n, o, c, i) {
          return 0 <= n && n <= 15 ? o ^ c ^ i : 16 <= n && n <= 31 ? o & c | ~o & i : 32 <= n && n <= 47 ? (o | ~c) ^ i : 48 <= n && n <= 63 ? o & i | c & ~i : 64 <= n && n <= 79 ? o ^ (c | ~i) : "rmd160_f: j out of range";
        }
        function s(n) {
          return 0 <= n && n <= 15 ? 0 : 16 <= n && n <= 31 ? 1518500249 : 32 <= n && n <= 47 ? 1859775393 : 48 <= n && n <= 63 ? 2400959708 : 64 <= n && n <= 79 ? 2840853838 : "rmd160_K1: j out of range";
        }
        function m(n) {
          return 0 <= n && n <= 15 ? 1352829926 : 16 <= n && n <= 31 ? 1548603684 : 32 <= n && n <= 47 ? 1836072691 : 48 <= n && n <= 63 ? 2053994217 : 64 <= n && n <= 79 ? 0 : "rmd160_K2: j out of range";
        }
      }
    }, function(D, A) {
      var F = !1;
      F = t, t && typeof fe == "object" && fe && fe === fe.global && (D = fe), typeof A == "function" && typeof A.amd == "object" && A.amd ? A(function() {
        return r;
      }) : F ? e && e.exports === F ? e.exports = r : F.Hashes = r : D.Hashes = r;
    }(this);
  })();
})(k, k.exports);
const xe = new k.exports.Base64(), pe = new k.exports.MD5({
  uppercase: !0,
  utf8: !0
}), Be = new k.exports.SHA1({
  uppercase: !0,
  utf8: !0
}), be = new k.exports.SHA256({
  uppercase: !0,
  utf8: !0
}), we = new k.exports.SHA512({
  uppercase: !0,
  utf8: !0
}), Fe = new k.exports.RMD160({
  uppercase: !0,
  utf8: !0
}), Ge = (e) => window && typeof window.btoa == "function" ? window.btoa(e) : xe.encode(e), Ie = (e) => window && typeof window.atob == "function" ? window.atob(e) : xe.decode(e), Ke = (e, t = !0) => (pe.setUpperCase(t), pe.hex(e)), Ne = (e, t = !0) => (Be.setUpperCase(t), Be.hex(e)), ze = (e, t = !0) => (be.setUpperCase(t), be.hex(e)), Xe = (e, t = !0) => (we.setUpperCase(t), we.hex(e)), Ve = (e, t = !0) => (Fe.setUpperCase(t), Fe.hex(e)), Ee = () => {
  const e = [], t = new Array(2).fill("0123456789abcdef").join("");
  for (let f = 0; f < 36; f++) {
    const a = Math.floor(Math.random() * 16);
    e[f] = t.substring(a, a + 1);
  }
  e[14] = "4";
  const r = e[19] & 3 | 8;
  return e[19] = t.substring(r, r + 1), e[8] = "-", e[13] = "-", e[18] = "-", e[23] = "-", e.join("");
}, We = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  __proto__: null,
  Base64Encoding: Ge,
  Base64Decoding: Ie,
  MD5Hash: Ke,
  SHA1Hash: Ne,
  SHA256Hash: ze,
  SHA512Hash: Xe,
  RMD160Hash: Ve,
  UUID: Ee
}, Symbol.toStringTag, { value: "Module" })), Ye = (e) => e === null, Je = (e) => e === void 0, ie = (e) => e != null, j = (e) => e == null || e === "", ye = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  __proto__: null,
  isNull: Ye,
  isUndefined: Je,
  isExist: ie,
  isEmpty: j
}, Symbol.toStringTag, { value: "Module" })), _e = (e, t = 2) => {
  if (t > 10)
    throw new Error("length is too large");
  const r = Math.pow(10, t);
  return Math.round(e * r) / r;
}, se = (e, t = 2, r = "0") => {
  const f = typeof e == "string" ? e : e.toString();
  return f.length >= 2 ? f : `${new Array(t - f.length).fill(r).join("")}${f}`;
}, Ze = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  __proto__: null,
  toFixed: _e,
  toFilled: se
}, Symbol.toStringTag, { value: "Module" })), Ce = /[\s\n\t]+/g, Se = /^#([0-9a-fA-F]{6}|[0-9a-fA-F]{8})$/, me = /^(rgb\((\d{1,3},){2}\d{1,3}\))|(rgba\((\d{1,3},){3}((0(\.\d+)?)|1)\))$/, ee = (e) => {
  let t = e.replace(Ce, "");
  const r = {
    red: 255,
    green: 255,
    blue: 255,
    alpha: 1,
    hasAlpha: !1
  };
  if (Se.test(t)) {
    t = t.replace(/#/g, "").toLocaleLowerCase();
    const f = [];
    for (let a = 0; a < Math.floor(t.length / 2); a++) {
      const g = parseInt(t.substring(2 * a, 2 * a + 2), 16);
      a > 2 ? f.push(_e(g / 255, 2)) : f.push(g);
    }
    r.red = j(f[0]) ? 255 : f[0], r.green = j(f[1]) ? 255 : f[1], r.blue = j(f[2]) ? 255 : f[2], f.length > 3 && (r.alpha = j(f[3]) ? 1 : f[3], r.hasAlpha = !0);
  } else if (me.test(t)) {
    t = t.replace(/[rgba()]+/g, "");
    const f = t.split(",").map((a) => parseInt(a, 10));
    r.red = j(f[0]) ? 255 : f[0], r.green = j(f[1]) ? 255 : f[1], r.blue = j(f[2]) ? 255 : f[2], f.length > 3 && (r.alpha = j(f[3]) ? 1 : f[3], r.hasAlpha = !0);
  } else
    throw new Error(`${e}: this is not a color string`);
  return r;
}, re = (e, t, r, f) => {
  const a = [e, t, r];
  return f !== void 0 && a.push(Math.floor(f * 255)), `#${a.map((y) => se(y.toString(16), 2)).join("")}`;
}, te = (e, t, r, f) => f !== void 0 ? `rgba(${e},${t},${r},${f})` : `rgb(${e},${t},${r})`, Qe = (e) => {
  const t = e.replace(Ce, "");
  if (!Se.test(t))
    throw new Error(`${e}: this is not a hex string`);
  const r = ee(t);
  return r.hasAlpha ? te(r.red, r.green, r.blue, r.alpha) : te(r.red, r.green, r.blue);
}, je = (e) => {
  const t = e.replace(Ce, "");
  if (!me.test(t))
    throw new Error(`${e}: this is not a rgb string`);
  const r = ee(t);
  return r.hasAlpha ? re(r.red, r.green, r.blue, r.alpha) : re(r.red, r.green, r.blue);
}, De = (e) => {
  const t = ee(e);
  return (t.red * 299 + t.green * 587 + t.blue * 114) / 255e3 >= 0.5 ? "light" : "dark";
}, ke = (e) => De(e) === "light", er = (e) => De(e) === "dark", ve = (e, t = 0) => {
  const { red: r, green: f, blue: a } = e;
  return t >= 0 ? {
    red: r + Math.floor((255 - r) * t),
    green: f + Math.floor((255 - f) * t),
    blue: a + Math.floor((255 - a) * t)
  } : {
    red: r - Math.floor(r * t),
    green: f - Math.floor(f * t),
    blue: a - Math.floor(a * t)
  };
}, rr = (e, t = 0, r = !1) => {
  const f = ee(e);
  if (t < 0 || t > 1)
    throw new Error(`${t}: level must between 0 and 1`);
  const a = ve(f, t);
  return r ? f.hasAlpha ? te(a.red, a.green, a.blue, f.alpha) : te(a.red, a.green, a.blue) : f.hasAlpha ? re(a.red, a.green, a.blue, f.alpha) : re(a.red, a.green, a.blue);
}, tr = (e, t = 0, r = !1) => {
  const f = ee(e);
  if (t < 0 || t > 1)
    throw new Error(`${t}: level must between 0 and 1`);
  const a = ve(f, -t);
  return r ? f.hasAlpha ? te(a.red, a.green, a.blue, f.alpha) : te(a.red, a.green, a.blue) : f.hasAlpha ? re(a.red, a.green, a.blue, f.alpha) : re(a.red, a.green, a.blue);
}, nr = (e, t, r, f = !1) => {
  const a = ee(e), g = ee(t);
  if (r < 1)
    throw new Error(`${r}: steps must more than 1`);
  const y = (g.red - a.red) / r, O = (g.green - a.green) / r, P = (g.blue - a.blue) / r;
  return new Array(r).fill("").map((G, M) => {
    const T = Math.ceil(y * M + a.red), N = Math.ceil(O * M + a.green), D = Math.ceil(P * M + a.blue), A = Math.ceil(y * (M + 1) + a.red), F = Math.ceil(O * (M + 1) + a.green), p = Math.ceil(P * (M + 1) + a.blue);
    return f ? [te(T, N, D), te(A, F, p)] : [re(T, N, D), re(A, F, p)];
  });
}, or = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  __proto__: null,
  parse: ee,
  hex2rgb: Qe,
  rgb2hex: je,
  colorMode: De,
  isLight: ke,
  isDark: er,
  lighten: rr,
  darken: tr,
  splitGradientColor: nr
}, Symbol.toStringTag, { value: "Module" })), fr = (e, t = "yyyy-MM-dd hh:mm:ss") => {
  const r = e instanceof Date ? e : new Date(e), f = {
    "y+": r.getFullYear(),
    "M+": r.getMonth() + 1,
    "d+": r.getDate(),
    "h+": r.getHours(),
    "m+": r.getMinutes(),
    "s+": r.getSeconds(),
    "q+": Math.floor((r.getMonth() + 3) / 3),
    "S+": r.getMilliseconds()
  };
  let a = t;
  return Object.keys(f).forEach((g) => {
    a = a.replace(new RegExp(`(${g})`, "g"), (y) => {
      if (g === "y+") {
        const O = se(f[g], y.length);
        return O.substring(O.length - y.length);
      }
      return se(f[g], y.length);
    });
  }), a;
}, sr = (e = 1, t = new Date().getFullYear()) => {
  if (!ie(t) || !ie(e) || t < 0 || e <= 0 || e > 12)
    return 0;
  const r = 24 * 60 * 60 * 1e3;
  let f = new Date(`${t}-${se(e + 1, 2)}-01 00:00:00`);
  return e === 12 && (f = new Date(`${t + 1}-01-01 00:00:00`)), new Date(f.getTime() - r).getDate();
}, ar = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  __proto__: null,
  formate: fr,
  getMonthDays: sr
}, Symbol.toStringTag, { value: "Module" })), cr = (e) => {
  const t = new FormData();
  return Object.keys(e).forEach((r) => {
    const f = e[r];
    ie(f) && (Array.isArray(f) ? f.forEach((a) => {
      Object.prototype.toString.call(a) === "[object Object]" ? t.append(`${r}[]`, JSON.stringify(a)) : t.append(`${r}[]`, a);
    }) : Object.prototype.toString.call(f) === "[object Object]" ? t.append(r, JSON.stringify(e[r])) : t.append(r, e[r]));
  }), t;
}, lr = (e) => {
  const t = {};
  return e.forEach((r, f) => {
    Reflect.set(t, f, r);
  }), t;
}, ir = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  __proto__: null,
  toFormData: cr,
  toObject: lr
}, Symbol.toStringTag, { value: "Module" })), ce = (e = "", t = {}) => {
  const { separator: r = "-", complete: f = !1 } = t, a = typeof r == "string" ? r : `(${r.join("|")})`, g = new RegExp(`(${a}[a-z])`, "g");
  let y = e.replace(g, (O) => O[1].toLocaleUpperCase()).replace(new RegExp(a, "g"), "");
  return f && y.length > 0 && (y = y[0].toLocaleUpperCase() + y.substring(1)), y;
}, le = (e = "", t = {}) => {
  const { separator: r = "_" } = t;
  let f = e;
  return e.length > 0 && (f = f[0].toLocaleLowerCase() + f.substring(1)), f.replace(/[A-Z]{1}/g, (a) => `${r}${a.toLocaleLowerCase()}`).replace(/[0-9]+/g, (a) => `${r}${a}`);
}, ur = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  __proto__: null,
  toCamelCase: ce,
  toSeparatorCase: le
}, Symbol.toStringTag, { value: "Module" })), ae = (e) => e == null ? !1 : e.constructor === Object, hr = (e, t) => {
  if (ae(e)) {
    const r = t.split(/[.]+/g).map((a) => a.trim()).filter((a) => a.length > 0);
    let f = e;
    for (let a = 0; a < r.length; a++) {
      const g = r[a];
      if (f = Reflect.get(f, g), a === r.length - 1)
        return f;
      if (!ae(f))
        return;
    }
  }
}, dr = (e, t = []) => {
  if (!ae(e))
    return e;
  const r = {};
  return Array.isArray(t) ? t.forEach((f) => {
    Reflect.has(e, f) && Reflect.set(r, f, e[f]);
  }) : Reflect.set(r, t, e[t]), r;
}, Ar = (e, t = []) => {
  if (!ae(e))
    return e;
  const r = { ...e };
  return Array.isArray(t) ? t.forEach((f) => {
    Reflect.has(r, f) && delete r[f];
  }) : delete r[t], r;
}, oe = (e) => {
  if (typeof e != "object" || e === null)
    return e;
  if (e === null)
    return null;
  if (Array.isArray(e))
    return [...e].map((r) => oe(r));
  if (e instanceof Set)
    return /* @__PURE__ */ new Set([...e]);
  if (e instanceof Map)
    return new Map([...e]);
  const t = {};
  return Object.keys(e).forEach((r) => {
    const f = Reflect.get(e, r);
    Reflect.set(t, r, oe(f));
  }), t;
}, de = (e, t = {}) => {
  var f;
  const r = {
    ...t,
    separator: (f = t.separator) != null ? f : "_"
  };
  if (e == null)
    return e;
  if (e.constructor === Object) {
    const a = {};
    for (const g in e)
      e[g] === void 0 || e[g] === null ? Reflect.set(a, ce(g, r), e[g]) : e[g].constructor === Object || e[g].constructor === Array ? Reflect.set(a, ce(g, r), de(e[g])) : Reflect.set(a, ce(g, r), e[g]);
    return a;
  } else if (e.constructor === Array)
    return e.map((a) => a == null ? a : a.constructor === Object || a.constructor === Array ? de(a) : a);
  return e;
}, Ae = (e, t = {}) => {
  if (e == null)
    return e;
  if (e.constructor === Object) {
    const r = {};
    for (const f in e)
      e[f] === void 0 || e[f] === null ? Reflect.set(r, le(f, t), e[f]) : e[f].constructor === Object || e[f].constructor === Array ? Reflect.set(r, le(f, t), Ae(e[f])) : Reflect.set(r, le(f, t), e[f]);
    return r;
  } else if (e.constructor === Array)
    return e.map((r) => r == null ? r : r.constructor === Object || r.constructor === Array ? Ae(r) : r);
  return e;
}, gr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  __proto__: null,
  isObject: ae,
  getValue: hr,
  includeProperties: dr,
  excludeProperties: Ar,
  copy: oe,
  transformToCamelCase: de,
  transformToSeparatorCase: Ae
}, Symbol.toStringTag, { value: "Module" })), Cr = (e, t = "*") => {
  if (typeof e == "string") {
    const r = typeof t == "string" && t.length > 0 ? t[0] : "*", f = new Array(4).fill(r).join("");
    if (/^[0-9]{11}$/.test(e))
      return `${e.substring(0, 3)}${f}${e.substring(7)}`;
    if (/^[0-9]{3,4}-[0-9]{8}$/.test(e)) {
      const a = e.split("-");
      return [
        a[0],
        `${a[1].substring(0, 2)}${f}${a[1].substring(6)}`
      ].join("-");
    }
  }
  return e;
}, Dr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  __proto__: null,
  phone: Cr
}, Symbol.toStringTag, { value: "Module" })), ne = /* @__PURE__ */ new Map(), pr = (e) => {
  const t = Ee();
  return ne.set(t, e), t;
}, Br = (e = "", t = void 0) => {
  ne.has(e) && ne.set(e, t);
}, br = (e = "") => {
  if (ne.has(e))
    return ne.get(e);
}, wr = (e = "") => {
  ne.has(e) && ne.delete(e);
}, Fr = () => {
  ne.clear();
}, yr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  __proto__: null,
  add: pr,
  update: Br,
  get: br,
  remove: wr,
  clear: Fr
}, Symbol.toStringTag, { value: "Module" })), Oe = (e, t) => {
  const r = [];
  return e.forEach((f) => {
    r.push(f), Array.isArray(f[t]) && r.push(...Oe(f[t], t));
  }), r;
}, xr = (e = [], t = "parentId", r = "id", f = [], a = []) => {
  if (!Array.isArray(e))
    return [];
  const g = Array.isArray(f) ? f : [f], y = e.map((q) => {
    const G = oe(q);
    return g.forEach((M) => {
      G[`__${M}`] = [q[M]];
    }), G;
  }), O = y.filter((q) => q[t] === "undefined" || q[t] === "null" || q[t] === void 0 || q[t] === null ? !0 : a.includes(q[t])), P = (q, G) => {
    q.forEach((M) => {
      G.forEach((T) => {
        T[t] === M[r] && (P([T], G), Array.isArray(M.children) ? M.children.push(oe(T)) : M.children = [oe(T)], g.forEach((N) => {
          Array.isArray(T[`${N}Index`]) && T[`__${N}`].unshift(M[N]);
        }));
      });
    });
  };
  return P(O, y), O;
}, Me = (e, t = "children") => {
  if (Array.isArray(e) && e.length > 0) {
    const r = e[0];
    return Array.isArray(r[t]) && r[t].length > 0 ? Me(r[t]) : r;
  }
}, Er = (e, t, r = !0, f) => Array.isArray(e) ? r === !0 ? e.filter((a) => a[t] === "undefined" || a[t] === null || parseInt(a[t].toString(), 10) < 0 || a[t] === f || parseInt(String(a[t]), 10) === parseInt(String(f), 10)) : e.filter((a) => a[t] === f || parseInt(String(a[t]), 10) === parseInt(String(f), 10)) : [], Re = (e, t, r = {}) => {
  if (Array.isArray(e)) {
    const { childrenKey: f = "children", idKey: a, lastSequence: g = [], lastIndex: y = [] } = r;
    return e.map((O, P) => {
      const q = a == null || a === "" ? P : O[a], G = [...g, q], M = [...y, P], T = Re(
        Array.isArray(O[f]) ? O[f] : [],
        t,
        { childrenKey: f, idKey: a, lastSequence: G, lastIndex: M }
      );
      return {
        ...O,
        ...t({
          data: O,
          index: P,
          sequence: G,
          indexSequence: M,
          isLeaf: T.length === 0
        }),
        children: T
      };
    });
  }
  return [];
}, $e = (e, t = {}) => {
  if (Array.isArray(e)) {
    const { childrenKey: r = "children", idKey: f, lastSequence: a = [], lastIndex: g = [] } = t;
    return e.map((y, O) => {
      const P = f == null || f === "" ? O : y[f], q = [...a, P], G = [...g, O], M = $e(
        Array.isArray(y[r]) ? y[r] : [],
        {
          childrenKey: r,
          idKey: f,
          lastSequence: q,
          lastIndex: G
        }
      );
      return {
        ...y,
        __data: y,
        __index: O,
        __sequence: q,
        __indexSequence: G,
        __isLeaf: M.length === 0,
        __children: M
      };
    });
  }
  return [];
}, _r = (e, t = {}) => {
  if (Array.isArray(e)) {
    const {
      childrenKey: r = "children",
      isLeaf: f = !1,
      targetKey: a,
      targetValue: g = void 0,
      validator: y
    } = t;
    if (typeof a == "string")
      return Te(e, a, g, { childrenKey: r, isLeaf: f });
    if (typeof y == "function")
      return Pe(e, y, { childrenKey: r, isLeaf: f });
  }
}, Te = (e, t, r = void 0, f) => {
  const { childrenKey: a, isLeaf: g } = f;
  for (const y of e)
    if (Array.isArray(y[a]) && y[a].length > 0) {
      if (!g && Reflect.get(y, t) === r)
        return y;
      const O = Te(y[a], t, r, f);
      if (O)
        return O;
    } else if (Reflect.get(y, t) === r)
      return y;
}, Pe = (e, t, r) => {
  const { childrenKey: f, isLeaf: a } = r;
  for (const g of e)
    if (Array.isArray(g[f]) && g[f].length > 0) {
      if (!a && t(g))
        return g;
      const y = Pe(g[f], t, r);
      if (y)
        return y;
    } else if (t(g))
      return g;
}, Sr = (e, t = {}) => {
  if (Array.isArray(e)) {
    const {
      childrenKey: r = "children",
      isLeaf: f = !1,
      targetKey: a,
      targetValue: g = void 0,
      validator: y
    } = t;
    if (typeof a == "string")
      return He(e, a, g, { childrenKey: r, isLeaf: f });
    if (typeof y == "function")
      return Le(e, y, { childrenKey: r, isLeaf: f });
  }
  return [];
}, He = (e, t, r = void 0, f) => {
  const a = [], { childrenKey: g, isLeaf: y } = f;
  for (const O of e)
    Reflect.get(O, t) === r && (y ? (!Array.isArray(O[g]) || Array.isArray(O[g]) && O[g].length === 0) && a.push(O) : a.push(O)), Array.isArray(O[g]) && O[g].length > 0 && a.push(
      ...He(O[g], t, r, f)
    );
  return a;
}, Le = (e, t, r) => {
  const f = [], { childrenKey: a, isLeaf: g } = r;
  for (const y of e)
    t(y) && (g ? (!Array.isArray(y[a]) || Array.isArray(y[a]) && y[a].length === 0) && f.push(y) : f.push(y)), Array.isArray(y[a]) && y[a].length > 0 && f.push(...Le(y[a], t, r));
  return f;
}, mr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  __proto__: null,
  flatTree: Oe,
  buildTree: xr,
  findFirstLeaf: Me,
  filterTree: Er,
  rebuildTree: Re,
  rebuildTreeFast: $e,
  findTreeNode: _r,
  findTreeNodes: Sr
}, Symbol.toStringTag, { value: "Module" })), vr = /^http(s){0,1}:\/\//, Or = /^https:\/\//, Mr = /:[0-9]+$/, Rr = /\/.*$/, $r = /#.+$/, Tr = /\?.+$/, Pr = {
  fullPath: "/",
  hash: null,
  host: null,
  isSSL: !1,
  isDefaultPort: !0,
  path: "/",
  port: 80,
  protocol: "http:",
  query: {},
  uri: "/"
}, Hr = (e) => {
  const t = oe(Pr);
  let r = e;
  if (typeof r == "string") {
    Or.test(e) && (t.protocol = "https:", t.port = 443), r = r.replace(vr, "");
    const f = r.indexOf("?");
    f > -1 && r.substring(f + 1).split("&").forEach((O) => {
      const P = O.indexOf("=");
      P > -1 && Reflect.set(
        t.query,
        O.substring(0, P),
        decodeURIComponent(O.substring(P + 1))
      );
    }), r = r.replace(Tr, "");
    const a = r.indexOf("#");
    a > -1 && (t.hash = r.substring(a + 1) || null), r = r.replace($r, "");
    const g = r.indexOf("/");
    g > -1 && (t.path = r.substring(g)), r = r.replace(Rr, "");
    const y = r.lastIndexOf(":");
    if (y > -1)
      try {
        t.port = parseInt(r.substring(y + 1), 10);
      } catch {
      }
    r = r.replace(Mr, ""), t.host = r || null;
  }
  return t.isSSL = t.protocol === "https:", t.isDefaultPort = t.protocol === "http:" && t.port === 80 || t.protocol === "https:" && t.port === 443, t.fullPath = ge(t, !0), t.uri = ge(t), t;
}, ge = (e, t = !1) => {
  let r = "";
  t === !1 && typeof e.host == "string" && e.host.length > 0 && (e.protocol === "http:" && e.port === 80 || e.protocol === "https:" && e.port === 443 ? r += `${e.protocol}//${e.host}` : r += `${e.protocol}//${e.host}:${e.port}`), e.path.length > 0 && (r.length === 0 || e.path !== "/") && (r += e.path), typeof e.hash == "string" && e.hash.length > 0 && (r += `#${e.hash}`);
  let f = "";
  for (const a in e.query)
    f.length > 0 ? f += `&${a}=${Reflect.get(e.query, a) || ""}` : f += `${a}=${Reflect.get(e.query, a) || ""}`;
  return f.length > 0 && (r += `?${f}`), r;
}, Lr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  __proto__: null,
  parse: Hr,
  stringify: ge
}, Symbol.toStringTag, { value: "Module" })), Ur = {
  Array: qe,
  Coding: We,
  Color: or,
  Common: ye,
  Date: ar,
  Number: Ze,
  FormData: ir,
  Object: gr,
  Privacy: Dr,
  Storage: yr,
  Tree: mr,
  URI: Lr,
  Word: ur,
  ...ye
};
export {
  qe as Array,
  We as Coding,
  or as Color,
  ye as Common,
  ar as Date,
  ir as FormData,
  Ze as Number,
  gr as Object,
  Dr as Privacy,
  yr as Storage,
  mr as Tree,
  Lr as URI,
  ur as Word,
  Ur as default
};
